Fox's Git Mirrors
examples/pageserver/README.md 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 4.06 KB
pageserver
Serves static pages under T383838/page/ and files under T383838/file/ over Reticulum
request handlers, with interfaces driven by a Reticulum configuration file.
The production entrypoint is the main binary:
T282828
reticulum-go pageserver [flags]
This directory keeps sample T383838pages/ / T383838files/ trees and a thin wrapper that
calls the same T383838pkg/cli / T383838pkg/pageserver code.
Build (example wrapper)
From this directory:
T282828
go build -o example-pageserver .
Or from the repo root:
T282828
make build
./bin/reticulum-go pageserver -h
Run
Default demo pageserver (from this directory so T383838pages/ and T383838files/ resolve):
T282828
make run
task example:pageserver
Or:
T282828
reticulum-go pageserver [flags]
./example-pageserver [flags]
go run -mod=mod . [flags]
Language-specific librns pageservers:
T282828
task example:pageserver:c
task example:pageserver:odin
task example:pageserver:zig
Configuration file
Interface configuration (TCP hubs, AutoInterface, UDP) lives in a Reticulum
configuration file. Default path:
T282828
~/.reticulum-go/config
Override with T383838-config /path/to/config. If the file does not exist it is
created with a single T383838Auto Discovery (T383838AutoInterface) entry using
T383838pkg/reticulumconfig. No external TCP hubs are baked in. Add your own.
The format is the standard Reticulum INI-style layout:
T282828
[reticulum]
enable_transport = yes
share_instance = yes
[logging]
loglevel = 4
[interfaces]
[[Auto Discovery]]
type = AutoInterface
enabled = yes
[[My TCP Hub]]
type = TCPClientInterface
enabled = yes
target_host = hub.example.com
target_port = 4242
[[Local UDP]]
type = UDPInterface
enabled = no
address = 0.0.0.0
port = 37696
Edit the file to enable or disable individual interfaces, change target
hosts, or add new ones. Supported interface types: T383838AutoInterface,
T383838TCPClientInterface, T383838UDPInterface. For local interop tests, the Go side
loads a config that adds a T383838UDPInterface with the chosen listen and target
ports.
Logging and verbosity
If you do not pass T383838-log-level or T383838-debug, verbosity comes from the
config file T383838[logging] T383838loglevel (1-7), same scale as T383838-debug. If that
value is missing or out of range, the binary falls back to critical-only
(level 1).
Pass T383838-log-level or T383838-debug on the command line to override the
file for that run.
Debug levels (T383838-debug / T383838-log-level)
┌───────┬──────────┬──────────────────────────────────────────────────────────────────────────┐
│ Level │ Name │ What you see │
├───────┼──────────┼──────────────────────────────────────────────────────────────────────────┤
│ 1 │ critical │ Fatal-style messages from this tool, default when no T383838-debug / T383838-log-level │
│ 2 │ error │ Errors and above │
│ 3 │ info │ General informational logs (includes much Reticulum stack output) │
│ 4 │ verbose │ More detail │
│ 5 │ trace │ Very chatty │
│ 6 │ packets │ Packet-level detail │
│ 7 │ all │ Everything │
└───────┴──────────┴──────────────────────────────────────────────────────────────────────────┘
T383838-log-level overrides T383838-debug when both are set.
Flags
┌─────────────────────────────────────────┬─────────────────┬──────────────────────────────────────┐
│ Flag │ Default │ Description │
├─────────────────────────────────────────┼─────────────────┼──────────────────────────────────────┤
│ T383838-config / T383838-c │ T383838"" │ Reticulum config path (default T383838~/.r… │
│ T383838-pages-dir / T383838-p │ T383838pages │ Pages directory for T383838/page/. │
│ T383838-files-dir / T383838-f │ T383838files │ Files directory for T383838/file/. │
│ T383838-node-name / T383838-n │ built-in name │ Node display name in announces. │
│ T383838-announce-interval / T383838-a │ T383838360 │ Periodic announces every N whole mi… │
│ T383838-page-refresh / T383838-pages-refresh-interval │ T3838380 │ Rescan pages dir every N seconds (T3838380… │
│ T383838-file-refresh / T383838-files-refresh-interval │ T3838380 │ Rescan files dir every N seconds (T3838380… │
│ T383838-identity / T383838-identity-path │ T383838"" │ Identity file path (default T383838~/.reti… │
│ T383838-debug │ (see T383838pkg/debug) │ Same scale as T383838-log-level when passe… │
│ T383838-log-level │ T383838-1 │ Sets level T3838381-T3838387. T383838-1 uses config. Ove… │
└─────────────────────────────────────────┴─────────────────┴──────────────────────────────────────┘
See also T383838man reticulum-go-pageserver.
Served by rngit 1.5.2 - Generated in 0.02s